import os
from datetime import timedelta

DEBUG = True

SECRET_KEY = 'key'
DIALECT = 'mysql'
DIRVER = 'pymysql'
USERNAME = 'root'
PASSWORD = 'chenbailin'
HOST = '127.0.0.1'
PORT = '3306'
DATABASE = 'flask_db'

SQLALCHEMY_DATABASE_URI = "{}+{}://{}:{}@{}:{}/{}?charset=utf8".format(DIALECT, DIRVER, USERNAME, PASSWORD, HOST, PORT,
                                                                       DATABASE)
SQLALCHEMY_TRACK_MODIFICATIONS = False
PERMANENT_SESSION_LIFETIME = timedelta(7)
